import utils
import objects
import jsonob

export utils

proc get_updates*(offset: int=0, timeout: int=60): Future[Update_response] {.async.} =
    let resp_json = await call_api("get-updates", @{"offset": $offset, "timeout": $timeout})
    return resp_json.to Update_response

proc send_message*(chat_id: int=0, message: string) {.async.} =
    discard await call_api("send-message", @{"chat_id": $chat_id, "text": message})

